1. Field of the Invention
The present invention relates to an image processing apparatus, an imaging apparatus, an imaging method, and a program and, more particularly, to an image processing apparatus, an imaging apparatus, an imaging method, and a program that are suitably used for executing tone correction processing on tone-compressed images.
2. Description of the Related Art
Recently, the enhancement in the performance of image sensors has widened the dynamic range of images that can be taken by video cameras. However, the dynamic range displayable by display apparatuses may be narrower than the dynamic range of images taken by video cameras compliant with the recent wide dynamic range. If this happens, the dynamic range of images has to be converted into narrower one. For one of conversion technologies, so-called tone compression technology for converting the luminance of input images by use of tone curve is known (refer to Japanese Patent Laid-open No. 2007-049540, hereinafter referred to as Patent Document 1, for example).
The above-mentioned technology allows those display apparatuses which cannot display all color tones for example to convert images of wide dynamic ranges while minimizing the lowering of image contrast.
Further, for technologies for enhancing color reproducibility by correcting the spectral sensitivity of the imaging device, so-called linear matrix processing is known by which the correction processing based on linear matrix is executed on each color output.
Linear matrix processing is a technology widely used in image signal processing. If this technology is combined with the tone compression technology, luminance inversion may occur in a low luminance section and a high luminance section in an image having a high luminance subject high in red or blue color purity such as an artificial light source including a neon light in a low luminance subject such as a night view, thereby making this image extremely unnatural.
Referring to FIG. 1, there is shown an example of a night view image in which high-rise buildings stand. As shown in FIG. 1, a night view image 1 having a high-rise building 3 also has a high luminance light source of almost monochromatic such as an airway beacon 4 within a wide low luminance section such as a night sky 2. Table 1 shows the luminance values of red component (R), green component (G), and blue component (B) and the luminance values (Y) of the entire image indicated by 10-bit tones for the low luminance section (the night sky 2) and the high luminance section (the airway beacon 4) of this night view image 1.
TABLE 1SubjectRGBYHigh luminance840240200415(light source, etc.)Low luminance (night sky, etc.)160160160160
As shown in Table 1, the low luminance section is achromatic, so that R, G, B take the same value (160), while the high luminance section is chromatic (red in this example), so that R (840) is greater than G (240) and B (200). However, G and B of the high luminance section are higher than G and B of the low luminance section, so that the luminance of the night view image 1 is higher in the high luminance section than in the low luminance section.
Referring to FIG. 2, there is shown a graph indicative of an example of a tone curve, in which the horizontal axis is indicative of input tone values and the vertical axis is indicative of output tone values. Table 2 shows the tone values (or output tone values) of the luminance values of R, G, B of the high luminance section and the low luminance section and the luminance values (Y) of an entire image in the image with the dynamic range (or input tone values) of the image compressed into an 8-bit tone by use of the tone curve shown in FIG. 2 for example for the night view image 1 mentioned above.
TABLE 2SubjectRGBYHigh luminance230130125159(light source, etc.)Low luminance (night sky, etc.)120120120120
The tone curve shown in FIG. 2 is a curve for compressing the one of mainly the high luminance side. If tone compression is done with such a tone curve, the luminance difference between the high luminance section (R=230, G=130, B=125) and the low luminance section (R=120, G=120, B=120) gets relatively small. However, because the tone curve always has a positive inclination at any positions along the input axis, no inversion will take place in the luminance values of the high luminance section and the low luminance section.